Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

f(x, y, w, w, a) → g1(x, x, y, w)
f(x, y, w, a, a) → g1(y, x, x, w)
f(x, y, a, a, w) → g2(x, y, y, w)
f(x, y, a, w, w) → g2(y, y, x, w)
g1(x, x, y, a) → h(x, y)
g1(y, x, x, a) → h(x, y)
g2(x, y, y, a) → h(x, y)
g2(y, y, x, a) → h(x, y)
h(x, x) → x

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

f(x, y, w, w, a) → g1(x, x, y, w)
f(x, y, w, a, a) → g1(y, x, x, w)
f(x, y, a, a, w) → g2(x, y, y, w)
f(x, y, a, w, w) → g2(y, y, x, w)
g1(x, x, y, a) → h(x, y)
g1(y, x, x, a) → h(x, y)
g2(x, y, y, a) → h(x, y)
g2(y, y, x, a) → h(x, y)
h(x, x) → x

Q is empty.

The TRS is overlay and locally confluent. By [15] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

f(x, y, w, w, a) → g1(x, x, y, w)
f(x, y, w, a, a) → g1(y, x, x, w)
f(x, y, a, a, w) → g2(x, y, y, w)
f(x, y, a, w, w) → g2(y, y, x, w)
g1(x, x, y, a) → h(x, y)
g1(y, x, x, a) → h(x, y)
g2(x, y, y, a) → h(x, y)
g2(y, y, x, a) → h(x, y)
h(x, x) → x

The set Q consists of the following terms:

f(x0, x1, x2, x2, a)
f(x0, x1, x2, a, a)
f(x0, x1, a, a, x2)
f(x0, x1, a, x2, x2)
g1(x0, x0, x1, a)
g1(x0, x1, x1, a)
g2(x0, x1, x1, a)
g2(x0, x0, x1, a)
h(x0, x0)


Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

F(x, y, a, a, w) → G2(x, y, y, w)
F(x, y, w, w, a) → G1(x, x, y, w)
G1(y, x, x, a) → H(x, y)
G1(x, x, y, a) → H(x, y)
G2(y, y, x, a) → H(x, y)
F(x, y, w, a, a) → G1(y, x, x, w)
F(x, y, a, w, w) → G2(y, y, x, w)
G2(x, y, y, a) → H(x, y)

The TRS R consists of the following rules:

f(x, y, w, w, a) → g1(x, x, y, w)
f(x, y, w, a, a) → g1(y, x, x, w)
f(x, y, a, a, w) → g2(x, y, y, w)
f(x, y, a, w, w) → g2(y, y, x, w)
g1(x, x, y, a) → h(x, y)
g1(y, x, x, a) → h(x, y)
g2(x, y, y, a) → h(x, y)
g2(y, y, x, a) → h(x, y)
h(x, x) → x

The set Q consists of the following terms:

f(x0, x1, x2, x2, a)
f(x0, x1, x2, a, a)
f(x0, x1, a, a, x2)
f(x0, x1, a, x2, x2)
g1(x0, x0, x1, a)
g1(x0, x1, x1, a)
g2(x0, x1, x1, a)
g2(x0, x0, x1, a)
h(x0, x0)

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

F(x, y, a, a, w) → G2(x, y, y, w)
F(x, y, w, w, a) → G1(x, x, y, w)
G1(y, x, x, a) → H(x, y)
G1(x, x, y, a) → H(x, y)
G2(y, y, x, a) → H(x, y)
F(x, y, w, a, a) → G1(y, x, x, w)
F(x, y, a, w, w) → G2(y, y, x, w)
G2(x, y, y, a) → H(x, y)

The TRS R consists of the following rules:

f(x, y, w, w, a) → g1(x, x, y, w)
f(x, y, w, a, a) → g1(y, x, x, w)
f(x, y, a, a, w) → g2(x, y, y, w)
f(x, y, a, w, w) → g2(y, y, x, w)
g1(x, x, y, a) → h(x, y)
g1(y, x, x, a) → h(x, y)
g2(x, y, y, a) → h(x, y)
g2(y, y, x, a) → h(x, y)
h(x, x) → x

The set Q consists of the following terms:

f(x0, x1, x2, x2, a)
f(x0, x1, x2, a, a)
f(x0, x1, a, a, x2)
f(x0, x1, a, x2, x2)
g1(x0, x0, x1, a)
g1(x0, x1, x1, a)
g2(x0, x1, x1, a)
g2(x0, x0, x1, a)
h(x0, x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

F(x, y, a, a, w) → G2(x, y, y, w)
F(x, y, w, w, a) → G1(x, x, y, w)
G1(y, x, x, a) → H(x, y)
G1(x, x, y, a) → H(x, y)
G2(y, y, x, a) → H(x, y)
F(x, y, w, a, a) → G1(y, x, x, w)
F(x, y, a, w, w) → G2(y, y, x, w)
G2(x, y, y, a) → H(x, y)

The TRS R consists of the following rules:

f(x, y, w, w, a) → g1(x, x, y, w)
f(x, y, w, a, a) → g1(y, x, x, w)
f(x, y, a, a, w) → g2(x, y, y, w)
f(x, y, a, w, w) → g2(y, y, x, w)
g1(x, x, y, a) → h(x, y)
g1(y, x, x, a) → h(x, y)
g2(x, y, y, a) → h(x, y)
g2(y, y, x, a) → h(x, y)
h(x, x) → x

The set Q consists of the following terms:

f(x0, x1, x2, x2, a)
f(x0, x1, x2, a, a)
f(x0, x1, a, a, x2)
f(x0, x1, a, x2, x2)
g1(x0, x0, x1, a)
g1(x0, x1, x1, a)
g2(x0, x1, x1, a)
g2(x0, x0, x1, a)
h(x0, x0)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 8 less nodes.